let ProxyCreateSingleton = (function() {
    let instance = null;
    return function(name) {
        if (instance) {
            return instance
        }
        return instance = new Singlton(name);
    }
})();

let Singlton = function(name) {
    this.name = name;
}

Singlton.prototype.getName = function() {
    console.log(this.name);
}

let winner = new ProxyCreateSingleton("winner");
console.log(winner.getName());
let sunner = new ProxyCreateSingleton("sunner");
console.log(sunner.getName());